﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using BLL.Entities;

namespace HTAProDataImporter.Transport
{
    public class AccountTypeTransport : BaseEntityTransport
    {
        public override string CommandText
        {
            get { return "select * from tblBankType"; }
        }

        public override void InstanceFromReader(OleDbDataReader DR)
        {
            DynamicEnumTypeValue v = DynamicEnumTypeValue.CreateNewInstance<DynamicEnumTypeValue>();
            v.EnumTypeID = DataStore.BankAccountType.EntityID;
            v.Value = DR["BankType"].ToString();

            DataStore.BankAccountTypeValues.Add(DR["pkBankTypeID"].ToString(), v);
            DataStore.BankAccountType.Values.Add(v.Value, v);

        }
    }
}
